import { createApp } from 'vue'
import App from './App.vue'
import { createRouter, createWebHistory } from 'vue-router'
import Game from '@/components/Game'
import MapEditor from '@/components/MapEditor'
import Home from '@/components/Home'

const routerHistory = createWebHistory()

const router = createRouter({
  routes: [
    { path: '/game/:gameId', component: Game },
    { path: '/editor/:mapId', component: MapEditor },
    { path: '/editor', component: MapEditor },
    { path: '/', component: Home }
  ],
  history: routerHistory
})

const app = createApp(App)
app.use(router)
app.mount('#app')